# 计算1-100 的和。高斯求和

# 1 +2 +3 +4 .....+99 +100

i = 1
sum1 = 0
while i<=100:
    sum1 = sum1+ i
    i += 1

print(sum1)  # 5050


# (((0+1)+2)+3)+4.....+100